#!/usr/bin/env python

import wx
import views
import presenters
import interactors
import logging.config

from .._app import App as BaseApp
from _meta import Meta

class App(BaseApp, wx.App):
    '''App class

    @author Julot <andy.julot@gmail.com>
    @since Sunday, January 15, 2012. 05:05 PM'''

##    def __init__(self, *args, **kwargs):
##        wx.App.__init__(self, *args, **kwargs)
##        meta = Meta()
##        self.initLogging(meta.name.lower())
##        config = {'Data': {'Location': 'Location', 'folder': self.homeDir,
##                           'Sample': '1000'},
##                  'Trigger': {'Type': 'Trigger 1', 'Sensitivity': '1'}}
##        self.initConfig(meta.name.lower(), config)
##        logging.info('%s started.' % meta.name)
        
##    def __del__(self):
##        logging.info('%s shut down.\n' % Meta().name)
        
    def OnInit(self):
        view = views.Measure()
        interactor = interactors.Measure()
        presenter = presenters.Measure(view, interactor)
        view.Show()
        return True
